<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <link type="text/css" rel="stylesheet" href="../style.css" />
    <link type="text/css" rel="stylesheet" href="style.css" />
    <h:head>
        <title>WebShop</title>
    </h:head>
    <h:body styleClass="form">
        <h1>Index</h1>
        <p><br/><br/></p>

        <p>
            <h:link value="login" outcome="homePage" rendered="#{authBackingBean.loggedIn() == false}"/>
            <br/>
        </p>
        <p>
            <h:link value="register" outcome="registerPage" rendered="#{authBackingBean.loggedIn() == false}"/>
            <br/>
        </p>
        <p>
            <h:form>
                <h:commandLink id="logout" action="#{authBackingBean.logout()}" rendered="#{authBackingBean.loggedIn()}">
                    <p>
                        <h:outputText value="logout"/>
                    </p>
                </h:commandLink>
            </h:form>
        </p>
        <br/>
    </h:body>
</html>

